package com.dragon.modules.yuegou.mapper.member;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.dragon.modules.yuegou.entity.member.MemberEntity;
import com.dragon.modules.yuegou.model.member.Member;
import com.dragon.modules.yuegou.model.member.ReportQuery;
import com.dragon.modules.yuegou.model.member.UserInfoModel;
import com.dragon.modules.yuegou.model.member.UserReportModel;
import com.dragon.modules.yuegou.query.member.MemberLevelQuery;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * 会员信息 Mapper接口
 *
 * @author pbuilder generated
 * @date 2019-03-16 15:13:13
 * @version 2.0
 */
@Component("memMemberMapper")
public interface MemberMapper extends BaseMapper<MemberEntity> {

    /**
     * 集团分页查询商圈会员信息
     * */
    IPage<Member> search(IPage<MemberEntity> page, @Param("query") MemberLevelQuery query);

    /**
     * 查询导出会员信息
     * */
    List<Member> searchExport(@Param("query") MemberLevelQuery query);

    /**
     * 根据id查看会员信息
     * */
    Member getMemberById(@Param("id") String id,@Param("busdId") String busdId);

    String getRecMembers(Integer gender, String memberId);


    UserReportModel getUserBaseInfo(ReportQuery userReportQuery);

    Integer getSequentialUserAdd(ReportQuery userReportQuery);


	List<Map> getUseGenderTotal(@Param("busdId") String busdId);

    List<Map> getUseAgeGroupTotal(@Param("busdId") String busdId);

    List<Map> getUseBirthTotal(@Param("busdId") String busdId);

    Map getUseHasCarTotal(@Param("busdId") String busdId);


    IPage<UserInfoModel> getUserInfoList(IPage<UserInfoModel> page, @Param("userReportQuery") ReportQuery userReportQuery);


}
